# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=podman-tui
pkgver=1.2.3
pkgrel=0
pkgdesc="Terminal user interface for Podman v4 & v5"
url="https://github.com/containers/podman-tui"
license="Apache-2.0"
# s390x: podman (netavark & aardvark-dns -> nix crate)
arch="all !s390x"
makedepends="go gpgme-dev linux-headers btrfs-progs-dev lvm2-dev"
depends="podman"
options="!check"
source="$pkgname-$pkgver.tar.gz::https://github.com/containers/podman-tui/archive/v$pkgver.tar.gz"

# secfixes:
#   0.15.0-r0:
#     - CVE-2023-48795

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v .
}

package() {
	install -Dm0755 "$pkgname" -t "$pkgdir"/usr/bin
}

sha512sums="
5f1bb18a450a69921a2760035a3c8f0b4639edaedaff497e7db8e816dfcb82b89a87db3913ab0fd482a565cf0e943084712bf95b687ea16c01681f1a31698ba0  podman-tui-1.2.3.tar.gz
"
